var util = require('../../../utils/util.js');
var api = require('../../../config/api.js');
var app = getApp();

Page({
  data: {
     // 默认选中菜单
     currentTab: 0,
     index: 0,
     orderNo: '',
    categoryFilter: false,
    clientOrderConfirm: [],
    categoryId: 0
  },
  getData: function () {
    let that = this;
    that.getClientOrderConfirm();
  },
  getClientOrderConfirm() {
    var that = this;
    console.log('获取订单详情')
    util.request(api.UserCenterOrderDetail, {orderNo: that.data.orderNo })
      .then(function (res) {
        if (res.errno === 0) {
          that.setData({
            clientOrderConfirm: res.data
          });
        }
      });
  },
  onLoad: function (options) {
    // 页面初始化 options为页面跳转所带来的参数
    var that = this
    that.setData({
      orderNo: options.orderNo
    })
    that.getData();
  },
  onReady: function () {
    // 页面渲染完成
  },
  onShow: function () {
    // 页面显示

  },
  onHide: function () {
    // 页面隐藏

  },
  onUnload: function () {
    // 页面关闭

  }
})